package bat.ke.qq.com.controller;

import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.Controller;
import org.springframework.web.servlet.mvc.LastModified;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * 源码学院-Fox
 * 只为培养BAT程序员而生
 * http://bat.ke.qq.com
 * 往期视频加群:516212256 暗号:6
 */
public class SimpleController2 implements Controller, LastModified {
    private long lastModified = System.currentTimeMillis();

    @Override
    public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws Exception {
        ModelAndView mv = new ModelAndView("user");
        mv.addObject("name","fox");

        return mv;
    }

    @Override
    public long getLastModified(HttpServletRequest request) {
        return lastModified;
    }
}
